import request from '@/utils/request'

/**
 * 新增分类
 * @param pram
 */
export function addAdoptShop(pram) {
  const data = {
    name: pram.name
  }
  return request({
    url: '/admin/adoptShop/save',
    method: 'POST',
    params: data
  })
}

/**
 * 分类详情
 * @param pram
 */
export function infoAdoptShop(pram) {
  const data = {
    id: pram.id
  }
  return request({
    url: '/admin/adoptShop/info',
    method: 'GET',
    params: data
  })
}

/**
 * 删除分类
 * @param pram
 */
export function deleteAdoptShop(pram) {
  const data = {
    id: pram.id
  }
  return request({
    url: '/admin/adoptShop/delete',
    method: 'GET',
    params: data
  })
}

/**
 * 分类列表
 * @param pram
 */
export function listAdoptShop(pram) {
  const data = {
    limit: pram.limit,
    name: pram.name,
    page: pram.page

  }
  return request({
    url: '/admin/adoptShop/list',
    method: 'GET',
    params: data
  })
}

/**
 * 更新分类
 * @param pram
 */
export function updateAdoptShop(pram) {
  const data = {
    name: pram.name
  }
  return request({
    url: '/admin/adoptShop/update',
    method: 'POST',
    params: data
  })
}

/**
 * 店铺入驻列表
 * @param pram
 */
export function adoptShopDPInfo(params) {
  return request({
    url: '/admin/adoptShop/getDPInfo',
    method: 'GET',
    params
  })
}

/**
 * 店铺入驻详情
 * @param pram
 */
export function adoptShopDetail(params) {
  return request({
    url: '/admin/adoptShop/adoptShopDetail',
    method: 'GET',
    params
  })
}
